package com.bangdao.app.jetpacktest.jetpack.livedata;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

/**
 * @ProjectName: JetpackTest
 * @ClassName: ShareDataViewModel
 * @Description: java类作用描述
 * @Author: luhui
 * @Email: hui.lu@bangdao-tech.com
 * @CreateDate: 2022/6/4 00:25
 * @UpdateUser: luhui
 * @UpdateDate: 2022/6/4 00:25
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class ShareDataViewModel extends ViewModel {

    private MutableLiveData<Integer> progress;

    public LiveData<Integer> getProgress(){
        if(progress == null){
            progress = new MutableLiveData<>();
        }
        return progress;
    }

    @Override
    protected void onCleared() {
        super.onCleared();
        progress = null;
    }
}
